Create

Entity-Related Operation Statement

Syntax samples

CREATE <expression1> {AS <entity name>}
{TAKE {<expression2>} <resource>,...}

CREATE 10 AS EntX

CREATE 2 AS EntB TAKE 1 Res1, 2 Res2

CREATE Var1 AS Ent(Var2) TAKE Var3 Res(Var4)

Description

Creates a specified number of entities in addition to the original entity and copies all attributes of the original entity to each new entity. The first entity created can optionally take any of the resources owned by the parent entity. The newly created entities require no additional capacity at the location and are processed immediately.

The CREATE statement can simulate the creation of paperwork that needs to be hand-carried to another location to be approved while the base entity continues to process. Before the base entity can exit the location, the paperwork must be approved and routed back to the original location where it is joined to the base entity.

Valid In

The operation column of process edit tables only. CREATE may not be used in combination with LOAD, UNLOAD, GROUP, UNGROUP, SPLIT AS, or other CREATE statements in the same processing logic.

Components

<expression1>

The number of new entities to create. This expression is evaluated every time the create statement is encountered.

AS <entity name>

The name of the new entities. ProModel will search the process list for the new entity type and begin processing them before it finishes processing the entity that created them. If omitted, the entities will be named the same as the currently processing entity.

TAKE <expression2>

The first created entity will take any resources listed here from the parent entity. This component is optional. The second syntax example above creates two EntB’s. The first of the two will own one unit of Res1 and two units of Res2.

<resource>

The name of the resource whose ownership should be transferred to the first new entity. Using the keyword ALL here will take all resources owned by the parent entity.

Explicit Entity Actions

The CREATE statement forms a new entity with new statistical information and cost. ProModel adds an initial cost to explicitly created entities (i.e., entities created with the CREATE statement).

Implicit Entity Actions

ProModel allows you to use the CREATE statement implicitly as part of the routing definition. To do this, define a route block and check the New Entity option. ProModel does NOT add an initial cost to implicitly created entities.

Example

The following example shows how one entity, Record, creates two new entities. Note that there is no routing defined in this process for the new entities, Copy. The new entities are handled according to the logic defined in the subsequent process.

Process Table

Entity

Location

Operation (min)

Record

Station1

WAIT N(8,.3)

CREATE 2 AS

Copy

Copy

Station1

WAIT U(3,.3)

Routing Table

Blk

Output

Destination

Rule

Move Logic

1

Record

Station2

FIRST 1

MOVE FOR 5

1

Copy

File_Cab

FIRST 1

MOVE FOR 5

See Also

ORDER, SPLIT AS, ENT(), and RES().